<?php
/**
 * Created by PhpStorm.
 * User: yellow
 * Date: 2019/4/16
 * Time: 19:08
 */

namespace app\common\event;


class Admin
{

    public function beforeInsert($admin)
    {
        $admin->salt = getSalt();
        $admin->password = pwdMd5($admin->password, $admin->salt);
    }

}